﻿<?php 
error_reporting(E_ERROR|E_PARSE);
session_start();
if($_SESSION["islogin"]!=='igiveyouthepower'){
echo "<script language=JavaScript>\r\n";
echo "alert('请先登录!');\r\n";
echo "location.href='../index.html'\r\n";
echo "</script>";
}else{
require_once('../config.php');
?>
<?php 
$conn = mysql_connect($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd);
mysql_select_db($cfg_dbname,$conn);
$action=($_GET["action"]);
$id=intval($_GET["id"]);
if($_POST['id']<>''){$ID_Dele=implode(",",$_POST['id']);}

if($action=='del'){
if($ID_Dele<>''){
$sql = "delete from ph_action where id in(".$ID_Dele.")";
mysql_query($sql,$conn);}
if($id<>''){
$sql = "delete from ph_action where id ='".$id."'";
mysql_query($sql,$conn);}
echo "<script language=JavaScript>\r\n";
echo "alert('删除成功!');\r\n";
echo "location.href='list.php'\r\n";
echo "</script>";
}
?>
<?php }?>